# a, b = input().split()
# a, b = int(a), int(b)
# a *= 10 + 1
# c = a
# sum = 0
# for i in range(2, b+1, 2):
#     sum += a
#     a = a * 100 + c
# print(sum)


nums = list(map(int, input().split()))
a = nums[0] * (10 + 1)
sum1 = 0
for i in range(2, nums[1]+1, 2):
    sum1 += a
    a = a * 100 + 11 * nums[0]
print(sum1)